package com.laicunba.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.laicunba.dao.GenericQueryDao;
import com.laicunba.pojo.vo.WdzjAllVO;
import com.laicunba.pojo.vo.WdzjBorrowListVO;
import com.laicunba.pojo.vo.WdzjBorrowUserListVO;
import com.laicunba.service.WdzjService;

@Service
public class WdzjServiceImpl implements WdzjService {

	
	@Autowired
	private GenericQueryDao queryDao;
	
	@Override
	public WdzjAllVO findWdzjAll(Integer page,Integer pageSize,String date) {
		Map map = new HashMap<String,Object>();
		map.put("page", page);
		double size  ;
		size = pageSize*100/100;
		map.put("size", size);
		map.put("date", date);
		return queryDao.selectOne("BID_ANALYSIS.findWdzjAll", map);
	}

	@Override
	public List<WdzjBorrowListVO> findWdzjBorrowList(Integer page,Integer pageSize,String date) {
		Map map = new HashMap<String,Object>();
		map.put("page", page);
		map.put("pageSize", pageSize);
		map.put("pageBegin", pageSize*(page-1));
		map.put("date", date);
		return queryDao.selectList("BID_ANALYSIS.findWdzjBorrowList", map);
	}

	@Override
	public List<WdzjBorrowUserListVO> findWdzjBorrowUserList(String projectId) {
		// TODO Auto-generated method stub
		return queryDao.selectList("BID_ANALYSIS.findWdzjBorrowUserList", projectId);
	}


}
